<template>
  <div class="app-container">
    <h1>Vue3 Element Plus Demo</h1>
    
    <!-- 使用Element Plus的按钮组件 -->
    <el-button type="primary" @click="showMessage">点击我</el-button>
    
    <!-- 使用Element Plus的表格组件 -->
    <el-table :data="tableData" style="width: 100%; margin-top: 20px;">
      <el-table-column prop="date" label="日期" width="180" />
      <el-table-column prop="name" label="姓名" width="180" />
      <el-table-column prop="address" label="地址" />
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      tableData: [
        {
          date: '2023-05-15',
          name: '张三',
          address: '北京市朝阳区'
        },
        {
          date: '2023-05-16',
          name: '李四',
          address: '上海市浦东新区'
        },
        {
          date: '2023-05-17',
          name: '王五',
          address: '广州市天河区'
        }
      ]
    }
  },
  methods: {
    showMessage() {
      this.$message('Hello Element Plus!')
    }
  }
}
</script>

<style>
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}
</style>